package com.letv.core.bean;

import java.util.ArrayList;

import com.alibaba.fastjson.annotation.JSONField;

public class TabTopicAllDataBean implements LetvBaseBean {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;

    @JSONField(name = "tabDesc")
    private TabTopicDesc tabTopicDesc;
    
    @JSONField(name = "tabZtList")
    private TabTopicZtList tabTopicZtList;
    
    private int columnNum;
    
    private boolean isNormalVideo = false;
    
    public TabTopicAllDataBean() {
        tabTopicDesc = new TabTopicDesc();
        tabTopicZtList = new TabTopicZtList();
    }
    
    public TabTopicDesc getTabTopicDesc() {
        return tabTopicDesc;
    }

    public void setTabTopicDesc(TabTopicDesc tabTopicDesc) {
        this.tabTopicDesc = tabTopicDesc;
    }

    public TabTopicZtList getTabTopicZtList() {
        return tabTopicZtList;
    }

    public void setTabTopicZtList(TabTopicZtList tabTopicZtList) {
        this.tabTopicZtList = tabTopicZtList;
    }

    public int getColumnNum() {
        return columnNum;
    }

    public void setColumnNum(int columnNum) {
        this.columnNum = columnNum;
    }    

    public boolean isNormalVideo() {
        return isNormalVideo;
    }

    public void setNormalVideo(boolean isNormalVideo) {
        this.isNormalVideo = isNormalVideo;
    }



    public static class TabTopicDesc implements LetvBaseBean {
        /**
         * 
         */
        private static final long serialVersionUID = 1L;
        private String type;
        private String isCurrent;
        private String data;
        public String getType() {
            return type;
        }
        public void setType(String type) {
            this.type = type;
        }
        public String getIsCurrent() {
            return isCurrent;
        }
        public void setIsCurrent(String isCurrent) {
            this.isCurrent = isCurrent;
        }
        public String getData() {
            return data;
        }
        public void setData(String data) {
            this.data = data;
        }
    }
    
    public static class TabTopicZtList implements LetvBaseBean {
        /**
         * 
         */
        private static final long serialVersionUID = 1L;
        @JSONField(name = "subject")
        private TabSubject subject;
        
        @JSONField(name = "tabAlbumList")
        private ArrayList<AlbumNew> tabAlbumList;
        
        @JSONField(name = "tabVideoList")
        private TabVideoListBean tabVideoList;
        
        public TabTopicZtList() {
            subject = new TabSubject();
            tabAlbumList = new ArrayList<AlbumNew>();
            tabVideoList = new TabVideoListBean();
        }
        
        public TabSubject getSubject() {
            return subject;
        }
        public void setSubject(TabSubject subject) {
            this.subject = subject;
        }
        public ArrayList<AlbumNew> getTabAlbumList() {
            return tabAlbumList;
        }
        public void setTabAlbumList(ArrayList<AlbumNew> tabAlbumList) {
            this.tabAlbumList = tabAlbumList;
        }

        public TabVideoListBean getTabVideoList() {
            return tabVideoList;
        }

        public void setTabVideoList(TabVideoListBean tabVideoList) {
            this.tabVideoList = tabVideoList;
        }
    }
    
    public static class TabSubject implements LetvBaseBean {
        /**
         * 
         */
        private static final long serialVersionUID = 1L;
        
        private String desc;
        private String nameCn;
        private String ctime;
        private String type;
        
        public String getDesc() {
            return desc;
        }
        public void setDesc(String desc) {
            this.desc = desc;
        }
        public String getNameCn() {
            return nameCn;
        }
        public void setNameCn(String nameCn) {
            this.nameCn = nameCn;
        }
        public String getCtime() {
            return ctime;
        }
        public void setCtime(String ctime) {
            this.ctime = ctime;
        }
        public String getType() {
            return type;
        }
        public void setType(String type) {
            this.type = type;
        }   
    }
    
    public static class TabAlbumVideoList implements LetvBaseBean  {

        /**
         * 
         */
        private static final long serialVersionUID = 1L;
        
        private ArrayList<AlbumNew> albumList;
        
//        private ArrayList<VideoBean> videoList;
//        
//        /*
//         * 是否为专辑： true: 为专辑列表； false：视频列表
//         */
//        private boolean isAlbumType; 
        
        public TabAlbumVideoList() {
            albumList = new ArrayList<AlbumNew>();
//            videoList = new ArrayList<VideoBean>();
        }

        public ArrayList<AlbumNew> getAlbumList() {
            return albumList;
        }

        public void setAlbumList(ArrayList<AlbumNew> albumList) {
            this.albumList = albumList;
        }

//        public ArrayList<VideoBean> getVideoList() {
//            return videoList;
//        }
//
//        public void setVideoList(ArrayList<VideoBean> videoList) {
//            this.videoList = videoList;
//        }
//
//        public boolean isAlbumType() {
//            return isAlbumType;
//        }
//
//        public void setAlbumType(boolean isAlbumType) {
//            this.isAlbumType = isAlbumType;
//        }
    }

    public AlbumNew getAlumNewByPid(long pid) {
        if (null == getTabTopicZtList()) {
            return null;

        }
        ArrayList<AlbumNew> albumNewArrayList = getTabTopicZtList().getTabAlbumList();
        if (null == albumNewArrayList) {
            return null;
        }
        for (AlbumNew albumNew : albumNewArrayList) {
            if (albumNew.getAid() == pid) {
                return albumNew;
            }
        }
        return null;
    }
}
